import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询列表
export function listPage(query) {
    return request({
        url: '/system/caiGouDan/list',
        method: 'get',
        params: query
    })
}

export function getPinLeiList(date) {
    return request({
        url: '/system/caiGouDan/getPinLeiList',
        method: 'get',
        params: {date}
    })
}

export function addCaiGouDan(riQi, selectedPinLei) {
    return request({
        url: '/system/caiGouDan/addCaiGouDan',
        method: 'post',
        data: {riQi, selectedPinLei}
    })
}

/** 列表导出 **/
export const exportListUrl = '/system/caiGouDan/export';


export function getCaiGouDanDetail(id) {
    return request({
        url: '/system/caiGouDan/getCaiGouDanDetail',
        method: 'get',
        params: {id: id}
    })
}

export function audit(id, status) {
    return request({
        url: '/system/caiGouDan/audit',
        method: 'get',
        params: {id: id, status: status}
    })
}

